<?php
if(basename($_SERVER['SCRIPT_NAME']) != "barangbukti.php") {
	header("Location:../../barangbukti.php");
	die();
}
?>
<div class="da-panel">
<div class="da-panel-header">
	<span class="da-panel-title">
		<i class="icon-circle-plus"></i> Tambah Barang Bukti
	</span>
</div>

<div class="da-panel-content da-form-container">
<form id="da-dialog-add-val" class="da-form" method="post" action="modul/barangbukti/barangbukti.proses.php">
	<div id="da-validate-error" class="da-message error" style="display:none;"></div>
	<table class="da-table da-detail-view no-border">
		<tbody>
		<tr>
			<th>Nomor Register</th>
			<td>
				<input type="text" readonly="true" placeholder="Nomor Register Barang Bukti" value="<?php echo bb_register();?>" name="kd_reg_bb">
				<!-- 164 / RB.2 / Ep.2 / 02 / 2010 -->
			</td>
		</tr>
		<tr>
			<th>Perkara</th>
			<td>
				<select class="select2 span6" name="kd_perkara">
				<?php
					$q = mysql_query("SELECT * FROM t_perkara a left join t_tersangka_spdp b on a.kd_perkara = b.kd_perkara left join t_tersangka c on b.kd_tersangka = c.kd_tersangka");
					while($dt = mysql_fetch_array($q)) {
				?>
					<option value="<?php  echo $dt['kd_perkara'] ?>"><?php echo $dt['nm_lengkap'].", (".$dt['kd_perkara'].")"; ?></option>
				<?php } ?>
				</select>
			</td>
		</tr>
		<tr>
			<th>Tanggal</th>
			<td>
				<input type="text" id="da-tgl-bb" name="tanggal" value="<?php echo date("d-m-Y") ?>"/>
			</td>
		</tr>
		<tr>
			<th>Jenis Barang Bukti</th>
			<td>
				<select name="jenis">
				<option value="0">-- Pilih --</option>				
				<?php 
					$q_jenis = mysql_query("SELECT * FROM t_bb_jenis");
					while($dt_jenis = mysql_fetch_array($q_jenis)) {
				?>
					<option value="<?php echo $dt_jenis['kd_jenis'] ?>"><?php echo $dt_jenis['nm_jenis'] ?></option>
				<?php } ?>
				</select>
			</td>
		</tr>
		<tr>
			<th>Nama Barang Bukti</th>
			<td>
				<input type="text" id="da-nama-bb" name="bb"/>
			</td>
		</tr>		
		<tr>
			<th>Jumlah</th>
			<td>
				<input type="text" id="da-jumlah-bb" name="jumlah"/>
			</td>
		</tr>		
		<tr>
			<th>Satuan</th>
			<td>
				<input type="text" id="da-satuan-bb" name="satuan"/>
			</td>
		</tr>		
		</tbody>
	</table>

	<div class="btn-row">
		<a href="barangbukti.php" class="btn"><i class="icol-cross"></i> Batal</a>
		<button class="btn"><i class="icol-disk"></i> Simpan</button>
		<input type="hidden" name="barangbukti" value="tambah" />
	</div>
</form>
</div>

</div>
